package com.it.selfAfter.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsAutoIncrement;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsKey;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.command.BaseModel;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;


import javax.persistence.Entity;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;

/**
 * @Author: Coke
 * @TIMESTAMP: 2023/05/20/17:05
 * @注释: 抽奖 奖品信息
 **/
@Data
@Entity
@TableName ("prize_info")
@Table (name = "prize_info", comment = "抽奖信息表")//设置表名  注释
public class PrizeInfo extends BaseModel implements Serializable {
    
    private static final long serialVersionUID = 9435278593475930L;
    
    @IsAutoIncrement   //自增
    @IsKey             //主键
    @TableId ( value = "id", type = IdType.AUTO)
    @Id
    @Column (comment = "ID")//字段注释
    private Long id;
    
    /**
     * 创建时间
     */
    
    @Column(name = "create_time", type = MySqlTypeConstant.TIMESTAMP, comment = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date createTime;
    
    /**
     * 修改时间
     */
    @Column(name = "update_time", type = MySqlTypeConstant.TIMESTAMP, comment = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date updateTime;
    
    /**
     * 联系手机
     */
    @Column(name = "phone",comment = "联系手机", length = 255)
    private String phone;
    
    /**
     * 抽奖次数
     */
    @Column(name = "count",comment = "抽奖次数", length = 255)
    private String count;
}
